import React from 'react'


import Index from './components/Index'


import List from './List.jsx'

import News from './News'


import { HashRouter as Router, Route, NavLink, Redirect, Switch } from 'react-router-dom'



import Login from './Login'
import Admin from './Admin'
import Author from './Author'



export default function App (props) {



    return (
        <>

            <Router>
                <div>
                    <NavLink to='/login'> 登录</NavLink>
                    <NavLink to='/admin'> 首页</NavLink>
                    <NavLink to='/news'>新闻</NavLink>
                </div>


                {/* <Index></Index>
            <List></List> */}
                {/* <News></News> */}


                <Switch>
                    <Route path='/login' component={Login}></Route>
                    <Author path="/admin" component={Admin} />
                    <Author path="/news" component={News} />

                    <Redirect from='/' to='/login'></Redirect>








                </Switch>



            </Router>
        </>

    )
}
